class Aniaml{
    public int age;
    public String name;
    static {
        System.out.println("父类静态代码块");
    }
    {
        System.out.println("父类实例代码块");
    }

    public Aniaml(int age, String name) {
        this.age = age;
        this.name = name;
        System.out.println(this.name+ "父类构造方法");
    }

}
class Dog extends Aniaml{
    static {
        System.out.println("子类静态代码块");
    }
    {
        System.out.println("子类实例代码块");
    }

    public Dog(int age, String name) {
        super(age, name);
        System.out.println("子类构造方法");
    }

    public static void main(String[] args) {
        Dog dog=new Dog(3,"旺财");
    }
}


